//
//  HYCNetService.m
//  HengYouCai
//
//  Created by ycgwl on 2017/5/13.
//  Copyright © 2017年 lwj. All rights reserved.
//

#import "HYCNetService.h"

@implementation HYCNetService

+ (void)mallHomeWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *resultDic))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_HOME andMetohd:@"post" andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSLog(@"%@",[[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:responseObject options:NSJSONWritingPrettyPrinted error:nil] encoding:NSUTF8StringEncoding]);

        NSDictionary *dictResult = responseObject;
        if ([responseObject[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }

        
        //
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        //
        failCb(statusCode,@"message");

//        NSLog(@"====%@====code==%ld",errorMsg,statusCode);

    }];
}
+ (void)getMobileCodeWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSString *strResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
//    NSString *strUrl = [NSString stringWithFormat:@"%@%@",Url_Server,Url_GetMobileCode];
    [self doHttpWithUrl:HYC_MobileCode andMetohd:@"post" andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
//        if (statusCode == 200) {
            NSDictionary *dictResult = responseObject;
            if ([responseObject[@"code"] isEqualToString:@"0"]) {
                successCb(dictResult[@"message"]);
            }else{
                failCb(statusCode,dictResult[@"message"]);
            }
//        }else{
//            failCb(statusCode,kErrorUnknown);
//        }
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
                NSLog(@"====%@====code==%ld",errorMsg,statusCode);

    }];
}
+ (void)registerWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSString *strResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    NSLog(@"%@=====dictResult",paramDict);

    [self doHttpWithUrl:HYC_Sign andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        NSLog(@"%@=====dictResult",dictResult);
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"message"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }

        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);

    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
    }];
}
+ (void)loginWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_LoginCheck andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"======%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
    }];
}
+ (void)getUserInfoSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_UserInfo andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
    }];
}
+ (void)getReSetPwdCodeWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb

{
    [self doHttpWithUrl:HYC_GetMobileCode andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,@"网络出错了！");
    }];
}
+ (void)reSetPwdWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_ReSetPwd andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,@"失败了 请重试");
    }];
}
+ (void)realNameAuthenticationDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_AccountAction andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"===%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"===%@",errorMsg);
    }];
}
+ (void)realNameReadyBindWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_BankCardReadyBind andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"===%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"===%@",errorMsg);
    }];
}
+ (void)realNamecConfirmBindWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_BankCardConfirmBind andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"===%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"===%@",errorMsg);
    }];
}
+ (void)accountActionSendMobileSmsWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_SendSms andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
                NSDictionary *dictResult = responseObject;
                if ([dictResult[@"code"] isEqualToString:@"0"]) {
                    successCb(dictResult[@"result"]);
                }else{
                    failCb(statusCode,dictResult[@"message"]);
                }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)accountActionMyBankOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_MyBank andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)accountActionBankListOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_BankList andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
                NSDictionary *dictResult = responseObject;
                if ([dictResult[@"code"] isEqualToString:@"0"]) {
                    successCb(dictResult[@"result"]);
                }else{
                    failCb(statusCode,dictResult[@"message"]);
                }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)accountUpdateLoginPasswordWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_UpdateLoginPsd andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,@"网络出错了");
    }];
}
+ (void)accountSetTradePasswordWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_SetTradePassword andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
                NSDictionary *dictResult = responseObject;
                if ([dictResult[@"code"] isEqualToString:@"0"]) {
                    successCb(dictResult[@"result"]);
                }else{
                    failCb(statusCode,dictResult[@"message"]);
                }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)accountUpdateTradePasswordWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_UpdateTradePassword andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)accountSendResetPaySmsdWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_SendResetPaySms andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)accountResetPayPasswordWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_ResetPayPassword andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)accountVerifyResetPayCodeWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_VerifyResetPayCode andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)loginOUtOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_LoginOut andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)productsGenreListOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Product_GenreList andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)productsListWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dataArr))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Product_ProductsList andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
//        NSLog(@"%@",errorMsg);
    }];
}
+ (void)productsDetailsWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Product_Details andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)productsCalculationProfitWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary * dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Product_CalculateProfit andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }

//        NSString *str = [NSString stringWithFormat:@"%@",responseObject];
//        
//        successCb([str doubleValue]);
//
        NSLog(@"%@",responseObject);
//
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@,===%ld",errorMsg,statusCode);
    }];
}
+ (void)productsBoundsWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary * dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Product_Bonuses andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }

        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        //
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@,===%ld",errorMsg,statusCode);
    }];
}
+ (void)productsProductsDetailsWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
//    [self doHttpWithUrl:HYC_Product_ProductsDetails andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
//        
//        NSDictionary *dictResult = responseObject;
//        if ([dictResult[@"code"] isEqualToString:@"0"]) {
//            successCb(dictResult[@"result"]);
//        }else{
//            failCb(statusCode,dictResult[@"message"]);
//        }
//        
//        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
//        
//    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
//        failCb(statusCode,errorMsg);
//        NSLog(@"%@",errorMsg);
//    }];

}
//+ (void)productsProductsReportWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
//{
//    [self doHttpWithUrl:HYC_Product_ProductsReport andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
//        
//        NSDictionary *dictResult = responseObject;
//        if ([dictResult[@"code"] isEqualToString:@"0"]) {
//            successCb(dictResult[@"result"]);
//        }else{
//            failCb(statusCode,dictResult[@"message"]);
//        }
//        
//        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
//        
//    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
//        failCb(statusCode,errorMsg);
//        NSLog(@"%@",errorMsg);
//    }];
//}
+ (void)productsOrderListWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Product_OrderList andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)productsStateWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Product_State andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)productsPaymentWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Product_Payment andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);

        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            NSString *code = dictResult[@"code"];
            failCb(code.integerValue,dictResult[@"message"]);
        }
        
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,@"投资是吧！请重试");
        
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)myWalletShowMyWalletOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Wallet_ShowWallet andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"%@",errorMsg);
    }];
}
+ (void)myWalletTradeDetailListWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb{
    
    [self doHttpWithUrl:HYC_Wallet_TradeListContent andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
/**
 * 流水查询
 *
 *  @param successCb 成功回调
 *  @param failCb    失败回调
 */
+ (void)myWalletTradeListWithDict:(NSDictionary*)paramDict interface:(NSString *)url onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:url andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
+ (void)getMyWalletaTradeDetailTypeListOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb{
    [self doHttpWithUrl:HYC_Wallet_TradeTypeList andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSLog(@"=====%@",[NSString changeObToJsonWith:responseObject]);
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
+ (void)getMyWalletaTradeTypeListOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb{
    
    [self doHttpWithUrl:HYC_Wallet_InvestListType andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSLog(@"=====%@",[NSString changeObToJsonWith:responseObject]);
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}

+ (void)myWalletInvestDetailListWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Wallet_InvestDetailList andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
+ (void)myWalletInvestDetailInfoWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Wallet_InvestDetailInfo andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
+ (void)myWalletMyredPackListWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Wallet_MyredPackList andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
//        if ([dictResult[@"code"] isEqualToString:@"0"]) {
//            successCb(dictResult);
//        }else{
//            failCb(statusCode,dictResult[@"message"]);
//        }
        successCb(dictResult[@"result"]);
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
+ (void)accountInvateRegListWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_InvateRegList andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
    
    NSDictionary *dictResult = responseObject;
    if ([dictResult[@"code"] isEqualToString:@"0"]) {
        successCb(dictResult[@"result"]);
    }else{
        failCb(statusCode,dictResult[@"message"]);
    }
    
    NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
    
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
    failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
    
}
+ (void)accountInvateInvestListWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_InvateInvestList andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
+ (void)accountSysAlertMessageWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_SysAlertMessage andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
+ (void)hotspotMallHotspotWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_MallHotspot andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);

        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);

        failCb(statusCode,errorMsg);
    }];
}
+ (void)withdrawWithdrawInitWithOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Withdraw_WithdrawInit andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
+ (void)paymentInitWithOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_PaymentInit andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}

+ (void)withdrawWithdrawSubWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Withdraw_WithdrawSub andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
//        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}

+ (void)paymentSubmitWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_PaymentSubmit andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
//        if ([dictResult[@"code"] isEqualToString:@"0"]) {
//            successCb(dictResult[@"result"]);
//        }else{
//            failCb(statusCode,dictResult[@"message"]);
//        }
        //因为有不同状态码 所以这里不做处理 0 100...
        //        if ([dictResult[@"code"] isEqualToString:@"0"]) {
        NSDictionary * result = dictResult[@"result"];
        if ([result[@"islink"] boolValue] == NO) {
            failCb([dictResult[@"code"] integerValue],result[@"message"]);
        }else{
            successCb(dictResult);
        }

//        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        //        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}

+ (void)paymentFindPayMentListOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Payment_FindPayMentList andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);

        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);

        failCb(statusCode,errorMsg);
    }];
}
+ (void)paymentFygoldRechargeWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Payment_FygoldRecharge andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
    }];
}
+ (void)feedBackWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_SaveFeedBack andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
+ (void)findBonusesByTypeWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_FindBonuses andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
+ (void)paymentRechargeWithDict:(NSDictionary*)paramDict onSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Recharge andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb([dictResult[@"code"] integerValue],dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@==﹒・﹒﹒==code==%ld",errorMsg,statusCode);
    }];
}
+ (void)getConmpareInfoOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_CommonParam andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"‘’‘’‘’‘%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
/**
 检测是否打开网页
 */
+ (void)getAppUseableOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb{
    
    [self doHttpWithUrl:HYC_Version200 andMetohd:kSHNetServicePost andParameters:@{} andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"=====%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
    
}
/**
 版本更新
 */
+ (void)getVersionOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Version andMetohd:kSHNetServicePost andParameters:@{} andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"=====%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];

}

/**
 一键默认
 */
+ (void)getUpdateUserDefaultLevelOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_UserEstimate_DefaultLevel andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}

/**
 立即投资check
 */
+ (void)getFindUserMaxInvestWithDict:(NSDictionary*)paramDict OnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_UserEstimate_FindUserMaxInvest andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        NSLog(@"=====%@",[NSString changeObToJsonWith:responseObject]);

        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"1"]) {
            successCb(dictResult[@"result"]);
        }else if([dictResult[@"code"] isEqualToString:@"0"]){
            
            successCb(nil);

        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}

/**
 评测列表取得
 */
+ (void)getEstimateQuestionListOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_EstimateQuestion andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        NSDictionary *dictResult = responseObject;
        NSLog(@"====%@===",[NSString changeObToJsonWith:dictResult]);

        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
                
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
/**
 用户评测信息保存
 */
+ (void)getEstimateUserLevelWithDict:(NSDictionary*)paramDict OnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_EstimateUserLevel andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
/**
 我的卡券类型
 */
+ (void)getMyWalletawardTypeOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_MyWallet_AwardTypeList andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSLog(@"=====%@",[NSString changeObToJsonWith:responseObject]);

        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
/**
 我的卡券
 */
+ (void)getMyCDKeyListWithDict:(NSDictionary*)paramDict OnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_MyCDKeyList andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"=====%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}
/**
 查看协议
 */
+ (void)getProtocolInvestmentWithDict:(NSDictionary*)paramDict OnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Protocol_Investment2 andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"=====%@",[NSString changeObToJsonWith:responseObject]);
        
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"====%@====code==%ld",errorMsg,statusCode);
    }];
}

/**
 我的界面未读消息
 */
+ (void)accountSysAlertNoReadOnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb
{
    [self doHttpWithUrl:HYC_Account_SysAlertNoRead andMetohd:kSHNetServicePost andParameters:nil andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
        
        NSLog(@"%@",[NSString changeObToJsonWith:responseObject]);

    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
    }];
}




/**********************广告页***********************/

/**
 * 广告页
 */
+ (void)homeAdParam:(NSDictionary *)paramDict onSuccess:(void(^)(NSString *jsonStr))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb{
    [self doHttpWithUrl:JCW_homeAdParam andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb([dictResult[@"result"] mj_JSONString]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"接口请求失败%@====%@====code==%ld",JCW_homeAdParam,errorMsg,statusCode);
    }];
}
/**********************广告页***********************/




/**********************更多界面***********************/

/**
 * 更多首界面接口
 */
+ (void)moreMoreWithDict:(NSDictionary*)paramDict OnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb{
    
    [self doHttpWithUrl:JCW_moreMore andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"接口请求失败%@====%@====code==%ld",JCW_moreMore,errorMsg,statusCode);
    }];
}
/**********************更多界面***********************/



/**********************个人设置**********************/

/**
 * 风险评测获取描述接口
 */
+ (void)estimateLevelWithDict:(NSDictionary*)paramDict OnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb{
    [self doHttpWithUrl:JCW_estimateLevel andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"接口请求失败%@====%@====code==%ld",JCW_estimateLevel,errorMsg,statusCode);
    }];
    
}
/**********************个人设置**********************/


/**********************提现界面***********************/

/**
 * 提现实际到账金额接口
 */
+ (void)withdrawActualAmtWithDict:(NSDictionary*)paramDict OnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb{
    [self doHttpWithUrl:JCW_WithdrawActualAmt andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb(statusCode,dictResult[@"message"]);
        }
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"接口请求失败%@====%@====code==%ld",JCW_WithdrawActualAmt,errorMsg,statusCode);
    }];
}

/**********************提现界面***********************/



/**********************新登录注册追加接口***********/

/**
 * 检查手机号是否已注册接口
 */
+ (void)checkMobileWithDict:(NSDictionary*)paramDict OnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb{
    [self doHttpWithUrl:JCW_CheckMobile andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb([dictResult[@"code"] integerValue],dictResult[@"message"]);
        }
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"接口请求失败%@====%@====code==%ld",JCW_CheckMobile,errorMsg,statusCode);
    }];
}
/**********************新登录注册追加接口***********/


/**********************邀请好友参数获取***********/

/**
 * 好友邀请标题 命名不规范 有空改
 */
+ (void)homeSystemWithDict:(NSDictionary*)paramDict OnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb{
    [self doHttpWithUrl:JCW_HomeSystem andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }else{
            failCb([dictResult[@"code"] integerValue],dictResult[@"message"]);
        }
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"接口请求失败%@====%@====code==%ld",JCW_HomeSystem,errorMsg,statusCode);
    }];
}

/**********************邀请好友参数获取***********/


/***********************宝付支付调起********************/

/**
 * 宝付支付
 *
 *  @param successCb 成功回调
 *  @param failCb    失败回调
 */
+ (void)paymentBaofooPaymentSubmitWithDict:(NSDictionary*)paramDict OnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb{
    [self doHttpWithUrl:JCW_BaofooPaymentSubmit andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        //因为有不同状态码 所以这里不做处理 0 100...
//        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult);
//        }else{
//            failCb([dictResult[@"code"] integerValue],dictResult[@"message"]);
//        }
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"接口请求失败%@====%@====code==%ld",JCW_BaofooPaymentSubmit,errorMsg,statusCode);
    }];
}

/***********************宝付支付调起********************/


/***********************获取服务器地址********************/

/**
 * 获取服务器地址
 *
 *  @param successCb 成功回调
 *  @param failCb    失败回调
 */
+ (void)getServerURLWithParams:(NSDictionary*)paramDict OnSuccess:(void(^)(NSDictionary *dictResult))successCb andFailed:(void(^)(NSInteger code,NSString *errorMsg))failCb{
    [self doHttpWithUrl:JCW_GetServerURL andMetohd:kSHNetServicePost andParameters:paramDict andHeaders:nil withSuccessHandler:^(id responseObject, NSInteger statusCode) {
        
        NSDictionary *dictResult = responseObject;
        if ([dictResult[@"code"] isEqualToString:@"0"]) {
            successCb(dictResult[@"result"]);
        }
    } andFailHandler:^(NSError *e, NSInteger statusCode, NSString *errorMsg) {
        failCb(statusCode,errorMsg);
        NSLog(@"接口请求失败%@====%@====code==%ld",JCW_GetServerURL,errorMsg,statusCode);
    }];
}

/***********************获取服务器地址********************/

@end
